<ion-view view-title="添加图片">
	<ion-content ng-class="{'no-footer': tabsHidden}">
		<form name="form" ng-submit="vm.submitForm(form.$valid)" novalidate>
			<div class="weui-cells weui-cells_form">
		        <div class="weui-cell">
		            <div class="weui-cell__hd">
		            	<label class="weui-label">标题</label>
		            </div>
		            <div class="weui-cell__bd">
		                <input name="title" class="weui-input" type="text" placeholder="标题" ng-model="vm.form.title" required>
		            </div>
		        </div>
		        <div class="weui-cell">
		            <div class="weui-cell__hd">
		            	<label class="weui-label">描述</label>
		            </div>
		            <div class="weui-cell__bd">
		                <input name="remark" class="weui-input" type="text" placeholder="描述（限50个字）" ng-model="vm.form.remark" maxlength="50" required>
		            </div>
		        </div>
		        <div class="weui-cell">
		            <div class="weui-cell__hd">
		            	<label class="weui-label">排序</label>
		            </div>
		            <div class="weui-cell__bd">
		                <input name="sort" class="weui-input" type="number" placeholder="排序（默认99）" ng-model="vm.form.sort" required>
		            </div>
		        </div>
		        <div class="weui-cell weui-cell_switch">
	                <div class="weui-cell__bd">显示</div>
	                <div class="weui-cell__ft">
	                    <input name="is_show" class="weui-switch" type="checkbox" ng-model="vm.form.is_show">
	                </div>
	            </div>
		    </div>
		    <div class="weui-cells__title">图片上传</div>
            <div class="weui-cells weui-cells_form">
                <div class="weui-cell">
                    <div class="weui-cell__bd">
                        <div class="weui-uploader">
                            <div class="weui-uploader__bd">
                                <ul class="weui-uploader__files">
                                    <li class="weui-uploader__file" style="background-image:url({{item.path}})" ng-repeat="item in vm.form.images track by $index" on-tap="vm.showGallery(item._id, $index)"></li>
                                </ul>
                                <div class="weui-uploader__input-box" ng-if="!vm.form.images.length">
                                    <input class="weui-uploader__input" name="file" type="file" accept="image/jpg,image/jpeg,image/png,image/gif" weui-file-model="vm.file" file-fn="vm.getFile()">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
		    <div class="weui-btn-area">
		        <button type="submit" class="weui-btn weui-btn_primary">保存</button>
		    </div>
	    </form>
	</ion-content>
</ion-view>